Skip to content

Remove distutils import which is deprecated since Python 3.12#361

Merged
kjohn-msft merged 1 commit into
masterfrom
distutils_deprecation
Jul 8, 2026
Merged

Remove distutils import which is deprecated since Python 3.12#361
kjohn-msft merged 1 commit into
masterfrom
distutils_deprecation

Conversation

@yashnap

@yashnap yashnap commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Fixed distutils module deprecation since python 312 .This deprecation is causing failure in Linux4 VM where python version is 3.14.3.
There is code already in place to address the above deprecation: #280
Import got reintroduced as a part of a separate PR and needs to be removed.

disutils

Copilot AI review requested due to automatic review settings July 8, 2026 15:57
@yashnap yashnap requested a review from najams as a code owner July 8, 2026 15:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes a deprecated distutils import from the packager’s “very first imports” list to prevent failures on newer Python versions (e.g., Python 3.12+ / 3.14.x) where distutils is removed.

Changes:

  • Removed from distutils.version import LooseVersion from VERY_FIRST_IMPORTS in the extension packager script.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.04%. Comparing base (8141566) to head (178da5f).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #361   +/-   ##
=======================================
  Coverage   94.04%   94.04%           
=======================================
  Files         109      109           
  Lines       19967    19967           
=======================================
  Hits        18778    18778           
  Misses       1189     1189           
Flag Coverage Δ
python27 94.04% <ø> (ø)
python312 94.04% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kjohn-msft kjohn-msft merged commit 662fb40 into master Jul 8, 2026
10 checks passed
@kjohn-msft kjohn-msft deleted the distutils_deprecation branch July 8, 2026 23:47
@yashnap yashnap mentioned this pull request Jul 10, 2026
yashnap added a commit that referenced this pull request Jul 10, 2026
This release contains:

Remove distutils import which is deprecated since Python 3.12 :
[361](#361)

[Bugfix] Core packager to always keep __main_ at the end :
[360](#360)

Feature: [Ubuntu, no-CVM] CVM machines to not get UEFI and kek
certificate updates :
[356](#356)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants